#include <stdio.h>
#include <math.h>

int main() {
    double input, output, d;
    double a, b, c;

    scanf("%lf", &input);  // 使用 %lf 更安全地读取 double

    a = floor(input/100);
    b = floor((input - a * 100) / 10);
    c = floor(input - a * 100 - b * 10);
    d = input - a * 100 - b * 10 - c;

    output = d * 1000 + c * 10 + b + a / 10.0;

    printf("%4.1f\n", output);

    return 0;
}